EMTool
Class EMDtd

java.lang.Object
  extended by EMTool.EMDtd
All Implemented Interfaces:
EMInterface

public class EMDtd
extends java.lang.Object
implements EMInterface

Much of the information use to develop this class came from the following two web sites http://java.sun.com/developer/technicalArticles/xml/jaxb/ https://jaxb.dev.java.net/

The xjc tool was used to creat the request and response classes from the DTD files. The four DTD files were created from the DTD definitions in the 7.0(1) Cisco Unified Communication Manager XML Developer Guide

The commands used to create the classes are as follows. the -p parameters put the classes in unique packages. This is required to avoid naming conflicts between the different classes. xjc -dtd loginrequest.dtd -p loginrequest xjc -dtd loginresponse.dtd -p loginresponse xjc -dtd queryrequest.dtd -p queryrequest xjc -dtd queryresponse.dtd -p queryresponse


Field Summary
(package private)  java.lang.String res
           
(package private)  java.lang.String serverIP
           
(package private)  java.lang.String serverpassword
           
(package private)  java.lang.String serverusername
           
 
Fields inherited from interface EMTool.EMInterface
DEVICEDOESNOTEXIST, FAILURE, NODEVICESFOUND, NOUSERSFOUND, SUCCESS, USERDOESNOTEXIST
 
Constructor Summary
EMDtd()
           
 
Method Summary
 void init(java.lang.String serverIP, java.lang.String serverUser, java.lang.String serverPassword)
           
 java.lang.String login(java.lang.String deviceName, java.lang.String username, java.lang.String deviceProfile, java.lang.String duration)
          Login the user into the device with the specificed profile
 java.lang.String logout(java.lang.String deviceName)
          Logout any user that is currently logged into the device
 java.lang.String queryDevice(java.lang.String username)
          Get the device name if any of the device the user is currently logged in to
 java.lang.String queryUser(java.lang.String deviceName)
          Get the username if any of the user currently logged in to the specified device
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverIP

java.lang.String serverIP

serverusername

java.lang.String serverusername

serverpassword

java.lang.String serverpassword

res

java.lang.String res
Constructor Detail

EMDtd

public EMDtd()
Method Detail

login

public java.lang.String login(java.lang.String deviceName,
                              java.lang.String username,
                              java.lang.String deviceProfile,
                              java.lang.String duration)
Description copied from interface: EMInterface
Login the user into the device with the specificed profile

Specified by:
login in interface EMInterface
Parameters:
deviceName - Device name of device to login to
username - User to log in
deviceProfile - Device profile to use
duration - null for infinite or number of minutes to remain logged in
Returns:
Text indicating success or failure of the action

logout

public java.lang.String logout(java.lang.String deviceName)
Description copied from interface: EMInterface
Logout any user that is currently logged into the device

Specified by:
logout in interface EMInterface
Parameters:
deviceName - Device name of device to logout of
Returns:
Text indicating success or failure of the action

queryUser

public java.lang.String queryUser(java.lang.String deviceName)
Description copied from interface: EMInterface
Get the username if any of the user currently logged in to the specified device

Specified by:
queryUser in interface EMInterface
Returns:
Username currently associated with device or failure text

queryDevice

public java.lang.String queryDevice(java.lang.String username)
Description copied from interface: EMInterface
Get the device name if any of the device the user is currently logged in to

Specified by:
queryDevice in interface EMInterface
Returns:
Devicename currently associated with user or failure text

init

public void init(java.lang.String serverIP,
                 java.lang.String serverUser,
                 java.lang.String serverPassword)
Specified by:
init in interface EMInterface
Parameters:
serverIP - This is the IP address of the server running the EM Services
serverUser - Username of a user with that can execute EM command via the EMServices interface This user must either be the user assigned to the device on which the operation is performed, or a user with the "Standard EM Autheticatio Proxy Rights" role. This parameter is used as the AppID in the AppInfo object
serverPassword - Password for the server USer. This parameter is used as the AppCertificate in the AppInfo object